fix(validator): detect name= in single-line pedigree assignment#20
Merged
Conversation
Why: developer-ecosystem@baab1534 revealed that `pedigree = component_pedigree
& { name = "..." }` written on a single line was not detected by the validator.
The `name =` check used `^[[:space:]]+name[[:space:]]*=` which requires name to
start a line with leading whitespace. On a single-line pedigree the opening and
closing braces appear on the same line as `pedigree =`, so pedigree_depth
returns to 0 immediately and subsequent line-iteration never has a chance to see
`name =` on a freshly-indented line.
Change (option b — parse the whole logical unit): the `name =` and
`version|schema_version =` checks now carry a second condition using the
unanchored pattern `[[:space:]]name[[:space:]]*=` which matches the inline
form. The existing anchored check is kept for the normal multi-line case.
Both checks are guarded by `in_pedigree == true` so they only fire within
the recognised pedigree block.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
hyperpolymath
enabled auto-merge (squash)
May 28, 2026 14:36
🔍 Hypatia Security ScanFindings: 74 issues detected
View findings[
{
"reason": "Action actions/upload-artifact@v4 needs attention",
"type": "unpinned_action",
"file": "release.yml",
"action": "pin_sha",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Action actions/download-artifact@v4 needs attention",
"type": "unpinned_action",
"file": "release.yml",
"action": "pin_sha",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in boj-build.yml",
"type": "unknown",
"file": "boj-build.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in casket-pages.yml",
"type": "unknown",
"file": "casket-pages.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in casket-pages.yml",
"type": "unknown",
"file": "casket-pages.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in codeql.yml",
"type": "unknown",
"file": "codeql.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in dependabot-automerge.yml",
"type": "unknown",
"file": "dependabot-automerge.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in dogfood-gate.yml",
"type": "unknown",
"file": "dogfood-gate.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in dogfood-gate.yml",
"type": "unknown",
"file": "dogfood-gate.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in dogfood-gate.yml",
"type": "unknown",
"file": "dogfood-gate.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
}
]Powered by Hypatia Neurosymbolic CI/CD Intelligence |
hyperpolymath
disabled auto-merge
May 28, 2026 20:19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pedigree = component_pedigree & { name = "..." }on a single line was silently ignored — the opening and closing braces appear on the same line sopedigree_depthreturned to 0 immediately, and thename =check (anchored^[[:space:]]+name) never matched an inline token[[:space:]]name[[:space:]]*=check (option b — parse the full logical unit) alongside the existing anchored checkversion|schema_versionfor consistencydeveloper-ecosystem@baab1534K9 validation failureTest plan
.k9.nclwithpedigree = component_pedigree & { name = "foo" }(single-line form) — validator must pass thenamecheck🤖 Generated with Claude Code